<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<html>


<head>


  <title>Server/client communication messages</title>
</head>
<body>

<h1>Description of the server/client communication messages</h1>
<p></p>
<p>While the attack process is being executed, in the server of client screen a series of messages that describes the progress of the key testing. An explanation about the different messages that may appear follows.<br></p>
<p><b><u>SERVER</u></b><br><br>
- &quot;<i>x</i> keys to try&quot;: shows the number <i>x</i> of keys that will be tested after calculating them.<br><br>
- &quot;Client <i>n</i>: <i>x</i> keys&quot;: shows the number <i>x</i> of keys that the client <i>n</i> has to test.<br><br>
- &quot;Awaiting connection...&quot;: the server has begun to wait for clients connections. It will wait until all the specified clients are connected.<br><br>
- &quot;Connection established with the client <i>z</i>&quot;: the client <i>z</i> has been detected properly. <i>z</i> is the address of the client expressed with the format <i>&lt;client_name&gt;/&lt;ip_addr&gt;</i>.<br><br>
- &quot;An error occurred while connecting with clients&quot;: the server was not able to receive the request from the clients or was not able to communicate with them. Anyway, the server will try to connect several times, so this message can appear several times as well if any error occurred in the communication process. If this keeps happening it may be caused by the network through which the server is connecting with the client, by the port of that the server uses, which may be used by other application, or by a momentary loss of information on the network. It is recommended to close the window of the client that has not established a connection with the server and start them again. Restarting the whole process, both on the server and on the clients, closing and opening the application again, can solve the problem too.<br><br>
- &quot;Key <i>n</i>: <i>z</i>&quot;: shows the initial key <i>z</i> that will be sent to the client <i>n</i>. <i>z</i> is the key in hexadecimal format.<br><br>
- &quot;Sending key... &quot;: the server has proceeded to send the specified key.<br><br>
- &quot;Key sent&quot;: the server has correctly sent the key to the client.<br><br>
- &quot;An error occurred while sending the key&quot;: the server received an unexpected answer from the client while sending the key. The process will stop on the client and the server will try to continuo with another client. This will happen when other clients try to connect to the server one it has finished detecting all the clients with which it has to connect. If that is not the case, then an error with the network occurred, so it is recommended to restart the process.<br><br>
- &quot;Sending text... &quot;: the server proceeds to send the plaintex and the ciphertext to the client.<br><br>
- &quot;Text sent&quot;: the server has correctly sent the text.<br><br>
- &quot;An error occurred while receiving the text": the server received an unexpected answer from the client while sending the text. The process will stop on the client and the server will try to continue with another client. This will happen when other clients try yo connect to the server once it has finished detecting all the clients to which it has to connect. if this is not the case, then an error occurred on the network, so it is recommended to restart the process.<br><br>
- &quot;Key generation ended properly&quot;: the process of generating and distributing the needed data to the clients has ended. This point can be reached even if an error occurred, because the server will try to continue even though the communication with some of the clients fails.<br><br>
- &quot;Starting ecryption on clients&quot; and &quot;Searching for keys...&quot;: the process of key testing starts on the clients. The server sends a message to each client to allow them to start trying keys to try to find the key used.<br><br>
- &quot;The client <i>z</i> has finished&quot;: the process of key searching has ended on the client <i>z</i>. <i>z</i> is the client adrres expressed with the format <i>&lt;client_name&gt;/&lt;ip_addr&gt;</i>.<br><br>
- &quot;Client: <i>z</i>&quot; and &quot;Key found&quot;: <i>x</i>": the client <i>z</i> has found a key <i>x</i> that is valid to decrypt the message and has sent it to the server. <i>z</i> is the address of the client expressed with the format <i>&lt;client_name&gt;/&lt;ip_addr&gt;</i>. <i>x</i> is the key in hexadecimal format.<br><br>
-&quot;Key search finished&quot; and &quot;<i>n</i> keys found&quot;: all the clients has finished the process of trying keys. It indicates the number <i>n</i> of keys that have been found.<br><br>
- &quot;An error occurred while searching for keys&quot;: and error occurred in the communication through the network, so it is recommended to restart the process. The server will stop looking for keys, though the clients will keep on trying keys, so they have to be closed os oirder to stop their execution. It has to be checked that there are no clients trying to connect once the server has detected all the clients to which it has to connect.<br><br>
- &quot;End of process&quot;: the server has stopped its execution. No more operations pending.<br><br>

<p><b><u>CLIENT</u></b><br><br>
- &quot;Connecting to server&quot;: the client tries to connect to the server. It will try to connect 100 times with a waiting time of 3 seconds between each try.<br><br>
- &quot;Connection established&quot;: the client has connected properly to the server.<br><br>
- &quot;An error occurred while connecting to the server&quot;: an error occurred on the network or the number of connection tries has reached its limit. It is recommended to close and open the client again in order to try to connect again with the server.<br><br>
- &quot;Receiving initial key...&quot;: the client is trying to receive the initial key from the server.<br><br>
- &quot;Key received&quot;: the client has correctly received the key.<br><br>
- &quot;An error occurred while receiving the key&quot;: and error occurred on the network. The client will end its execution immediately. If the server freezes after this happens, it may be because it is expecting an answer from this client. In this case, it is recommended to restart the process.<br><br>
- &quot;Initial key <i>x</i>&quot;: shows the initial key <i>x</i> from which the client will start to try. <i>x</i> is the key in hexadecimal format.<br><br>
- &quot;Number of keys to try: <i>n</i>&quot;: shows the number <i>n</i> of keys to try starting from the initial key.<br><br>
- &quot;Receiving text...&quot;: the client tries to receive the plaintext and the ciphertext from the server.<br><br>
- &quot;Text received&quot;: the client has correctly received the text.<br><br>
- &quot;An error occurred while receiving the text&quot;: an error occurred on the network. The client will end its execution immediately. If the server freezes after this happens, it may be because it is expecting an answer from this client. In this case, it is recommended to restart the process.<br><br>
- &quot;Starting key testing...&quot;: the client has received the order to start trying keys, so it will start the encryption process in search of the key.<br><br>
- &quot;Key found: <i>x</i>&quot;: the client has found the key <i>x</i> as valid for decrypting the message. <i>x</i> is the key in hexadecimal format.<br><br>
- &quot;Key testing finished&quot;: the client has finished testing all its corresponding keys.<br><br>
- &quot;An error occurred while testing the keys&quot;: a wrong key has been transmitted from the server or an error has occurred on the network. The client will stop trying keys and will communicate the server that it has finished. It is recommended to compare the initial key received from the server with the one that the server sends to see if they are the same. If not, it is a momentary error on the network and a restart of the process should solve the problem.<br><br>
- &quot;An error occurred while telling the server that this client has finished&quot;: an error occurred on the network while trying to communicate the server that the client has finished the process. If the server freezes after this happens, it may be because it is expecting an answer from this client, so it has to be stopped manually.<br><br>
- &quot;End of process&quot;: the client has finished. No more operations pending.<br><br>
</body>
</html>
